# Gunther's solution
n = eval(input("Enter the start number: "))
while (-6<n<2):
    for n in range(n,n+41,7):
        for o in range(n,n+7):
            print(format(o, "2"),"", end="")
        print()